﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WeddingEventManagement_API
{

    public class WeddingEventManagementException : Exception
    {
        public WeddingEventManagementException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }

    public class InvalidPostalCodeException : WeddingEventManagementException
    {
        public string PostalCode { get; private set; }
        public InvalidPostalCodeException(string message, string postalCode)
            :base(message, null)
        {
            PostalCode = postalCode;
        }
    }

    public class LocationExistsException : WeddingEventManagementException
    {
        public Location Location { get; private set; }
        public LocationExistsException(string message, Location location)
            :base(message, null)
        {
            Location = location;
        }
    }

    public class ClientPendingEventExcption : WeddingEventManagementException
    {
        public Event CsEvent { get; set; }
        public ClientPendingEventExcption(string message, Event csEvent)
            :base(message, null)
        {
            CsEvent = csEvent;
        }
    }

    public class InvalidClientException : WeddingEventManagementException
    {
        public int? ClientID { get; set; }
        public Client Client { get; set; }
        public InvalidClientException(string message, int? clientID, Client client = null)
            :base(message, null)
        {
            ClientID = clientID;
            Client = client;
        }
    }

    public class ClientExistsException : WeddingEventManagementException
    {
        public ClientExistsException(string message)
            : base(message, null)
        {
        }
    }

    public class EventExistsException : WeddingEventManagementException
    {
        public Event CsEvent { get; set; }

        public EventExistsException(string message, Event evt)
            :base(message, null)
        {
            CsEvent = evt;
        }
    }

    public class PhoneNumberNotProvidedException : WeddingEventManagementException
    {
        public PhoneNumberNotProvidedException(string message)
            : base(message, null)
        {
        }
    }

    public class PhoneNumberFormatInvalidException : WeddingEventManagementException
    {
        public int AreaCode { get; set; }
        public int Exchange { get; set; }
        public int LineNumber { get; set; }
        public int? Extension { get; set; }

        public PhoneNumberFormatInvalidException(string message, int areaCode, int exchange, int lineNumber, int? extension)
            : base(message, null)
        {
            AreaCode = areaCode;
            Exchange = exchange;
            LineNumber = lineNumber;
            Extension = extension;
        }
    }

}
